<?php

namespace common\model;

use think\model\RelationModel;

class DelayOrderTaskStepCategoryConfirmModel extends RelationModel
{
    //自动验证
    protected $_validate = [
        ['delay_order_task_id', '', '', self::MUST_VALIDATE, 'require', self::MODEL_INSERT],//必须字段
        ['step_category_id', '', '', self::MUST_VALIDATE, 'require', self::MODEL_INSERT],//必须字段
        ['confirm_user_id', '', '', self::MUST_VALIDATE, 'require', self::MODEL_INSERT],//必须字段
        ['need_delay', ['yes', 'no'], '', self::EXISTS_VALIDATE, 'in'], // 类型
    ];

    //自动完成
    protected $_auto = [
        ['created_by', 'fill_created_by', self::MODEL_INSERT, 'function'],
        ['created', 'time', self::MODEL_INSERT, 'function'],
        ['uuid', 'create_uuid', self::MODEL_INSERT, 'function'],
        ['updated_by', 'fill_created_by', self::MODEL_UPDATE, 'function'],
        ['updated', 'time', self::MODEL_UPDATE, 'function'],
    ];
}
